package org.brisling.sysman.domain;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Transient;

import org.brisling.base.domain.impl.BaseDomain;
import org.brisling.base.domain.inf.BaseDomainInf;
import org.brisling.common.ConstSysParam;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 
 * 岗位角色权限分派实体类
 * @author : jackson wang
 * @Date   : 2016年2月29日 上午 01:26:07
 * @version: 1.0
 * 
 */
@Entity
@Table(name=ConstSysParam.MODULE_JOBROLE_PERMISSION)
public class JobRolesPermission extends BaseDomain implements BaseDomainInf {

	
	
	private Long jobcode;
	
	@Transient
	private String jobname;
	
	private Long permissionid;
	
	@Transient
	private String permissionname;

	@Transient
	@JsonIgnore
	private Long parentPermissionid;
	
	@Transient
	private List<JobRolesPermission> childrens = new ArrayList<JobRolesPermission>();
	
	@Transient
	private String state = "closed";

	public Long getJobcode() {
		return jobcode;
	}

	public void setJobcode(Long jobcode) {
		this.jobcode = jobcode;
	}

	public String getJobname() {
		return jobname;
	}

	public void setJobname(String jobname) {
		this.jobname = jobname;
	}

	public Long getPermissionid() {
		return permissionid;
	}

	public void setPermissionid(Long permissionid) {
		this.permissionid = permissionid;
	}

	public String getPermissionname() {
		return permissionname;
	}

	public void setPermissionname(String permissionname) {
		this.permissionname = permissionname;
	}
	
	
	public Long getParentPermissionid() {
		return parentPermissionid;
	}

	public void setParentPermissionid(Long parentPermissionid) {
		this.parentPermissionid = parentPermissionid;
	}

	public List<JobRolesPermission> getChildrens() {
		return childrens;
	}

	public void setChildrens(List<JobRolesPermission> childrens) {
		this.childrens = childrens;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	
	
}
